import store from '../store/index.js'
import { createZrender,zrender } from '../libs/zrender-helper.js'
const init = () => {
  let config = store.state.config;
  let main = createZrender(config.el,config.width,config.height)
  //let main = zrender.init(document.getElementById(config.el),{
    //width : config.width,
    //height : config.height,
  //});
  store.state.main = main;
}

const convertPosition = (position) => {
  let [x,y] = position;
  return [x,store.state.config.width - 100 - y];
}

export { convertPosition,init }
